/****************************************************************************
**
** GenericGump.h
**
** Copyright (C) August 2014 Hotride
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
*****************************************************************************
*/
//---------------------------------------------------------------------------
#ifndef GenericGumpH
#define GenericGumpH
//---------------------------------------------------------------------------
class TGenericGump
{
private:
	int DrawTransparent(TGump *gump, int PosX, int PosY, int CanPressedButton);
	static void CopyBytes(PDWORD src, PWORD dest, int &X, int &Y, int &Width, int &Height, int &RealWidth, int &MaxWidth, int &MaxHeight, WORD &Color, bool &PartialHue);
	static void CopyBlock(PDWORD src, PDWORD dest, int &X, int &Y, int &Width, int &Height, int &RealWidth, int &MaxWidth);

public:
	TGenericGump() {}
	~TGenericGump() {}
	
	int Draw(bool mode, TGump *gump);

	void GenerateFrame(TGump *gump, float PosX, float PosY);

	void OnButtonUp(TGump *gump);
	
	static void GetResizepicData(PDWORD Data, WORD GumpID, int Width, int Height);
};
//---------------------------------------------------------------------------
#endif